package br.com.hhc.sample.fullstackspringhibernate.database.data.domain;

// Generated 18/03/2015 07:46:00 by Hibernate Tools 4.3.1

import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Instructors generated by hbm2java
 */
@Entity
@Table(name = "INSTRUCTORS")
public class Instructor implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;

	private Integer id;
	private String name;
	private String email;
	private char[] resume;
	private Date birthday;
	private String phoneNumber;
	
	private Set<InstructorClasses> instructorClasses;

	public Instructor() {
	}

	@Id
	@Column(name = "INSTRUCTOR_ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_INSTRUCTOR_ID")
	@SequenceGenerator(name = "SEQ_INSTRUCTOR_ID", sequenceName = "SEQ_INSTRUCTOR_ID", allocationSize=1, initialValue=1)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer instructorId) {
		this.id = instructorId;
	}

	@Column(name = "INSTRUCTOR_NAME", nullable = false, length = 256)
	public String getName() {
		return this.name;
	}

	public void setName(String instructorName) {
		this.name = instructorName;
	}

	@Column(name = "INSTRUCTOR_EMAIL", nullable = false, length = 256)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String instructorEmail) {
		this.email = instructorEmail;
	}

	@Lob
	@Column(name = "INSTRUCTOR_RESUME", nullable = false)
	public char[]  getResume() {
		return this.resume;
	}

	public void setResume(char[]  instructorResume) {
		this.resume = instructorResume;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "INSTRUCTOR_BIRTHDAY", nullable = false, length = 7)
	public Date getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Date instructorBirthday) {
		this.birthday = instructorBirthday;
	}

	@Column(name = "INSTRUCTOR_PHONE_NUMBER", nullable = false, length = 20)
	public String getPhoneNumber() {
		return this.phoneNumber;
	}

	public void setPhoneNumber(String instructorPhoneNumber) {
		this.phoneNumber = instructorPhoneNumber;
	}
	
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "instructors")
	public Set<InstructorClasses> getClasseses() {
		return this.instructorClasses;
	}

	public void setClasseses(Set<InstructorClasses> _InstructorClasses) {
		this.instructorClasses = _InstructorClasses;
	}
}
